package com.fahai.web.controller;/**
 * Created by Lilinjun on 17/6/10.
 */

import com.fahai.common.PageVo;
import com.fahai.utils.json.JsonResult;
import com.fahai.web.service.ProductInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * product_info表Controller
 *
 * @author
 * @create 2017-06-10 下午12:12
 **/
@Controller
@EnableGlobalMethodSecurity(prePostEnabled = true)
@RequestMapping(value = "/product")
public class ProductInfoController  extends  BaseController{
    private static Logger logger = LoggerFactory.getLogger(SceneInfoController.class);

    @Autowired
    private  ProductInfoService service;

    @RequestMapping(value="/option" ,method = RequestMethod.POST)
    @ResponseBody
    public JsonResult getProductOptions(Model model){
        PageVo pageVo=new PageVo();
        pageVo.setResult(service.getProductInfoOptions());
        return ok("获取产品列表",pageVo);
    }

}
